package JavaSE.StreamLearning.DataStream;

import java.io.*;

/**
 *  测试 数据流输入输出
 *
 */
public class DataOutput {
    public static void main(String[] args) throws IOException {
        DataOutputStream dos = new DataOutputStream(new FileOutputStream("src\\JavaSE\\DataStream\\a.txt"));
        dos.writeInt(29523);
        dos.writeChar('C');
        dos.writeBoolean(true);
        DataInputStream dis = new DataInputStream(new FileInputStream("src\\JavaSE\\DataStream\\a.txt"));
        System.out.println(dis.readInt());
        System.out.println(dis.readChar());
        System.out.println(dis.readBoolean());
        dos.close();
    }
}
